home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / Examples ƒ / Example / IC Resource ƒ / IC Headers ƒ / IC API.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-17  |  3.9 KB  |  110 lines  |  [TEXT/SPM ]

  1. /*
  2.     IC API.h
  3.     
  4.     Header file describing the main interface to the IC library.  The routines below are actually
  5.     switch routined which can call either the linked in code or the IC component (whichever is
  6.     available and allowed).
  7. */
  8.  
  9. #pragma once
  10.  
  11. #ifndef __IC_API__
  12. #define __IC_API__
  13.  
  14. #include "IC Types.h"
  15. #include "IC Keys.h"
  16.  
  17. #if 0
  18. // Routine Descriptions
  19. #include "IC API Descriptions.h"
  20. #endif
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. OSErr ICEnableComponent(void);
  27. OSErr ICDisableComponent(void);
  28. OSErr ICEnableLinkedCode(void);
  29. OSErr ICDisableLinkedCode(void);
  30. Boolean ICComponentEnabled(void);
  31. Boolean ICLinkedCodeEnabled(void);
  32. Boolean ICUsingComponent(ICInstance inst);
  33.  
  34. /* ***** Starting Up and Shutting Down ***** */
  35.  
  36. ICError ICStart(ICInstance* inst,OSType creator);
  37. ICError ICStop(ICInstance inst);
  38.  
  39. /* ***** Specifying a Configuration ***** */
  40.  
  41. ICError ICFindConfigFile(ICInstance inst,short count,ICDirSpecArrayPtr folders);
  42. ICError ICFindUserConfigFile(ICInstance inst,ICDirSpec* where);
  43. ICError ICGeneralFindConfigFile(ICInstance inst,Boolean search_prefs,Boolean can_create,short count,ICDirSpecArrayPtr folders);
  44. ICError ICChooseConfig(ICInstance inst);
  45. ICError ICChooseNewConfig(ICInstance inst);
  46. ICError ICGetConfigName(ICInstance inst,Boolean longname,StringPtr name);
  47. ICError ICGetConfigReference(ICInstance inst,ICConfigRefHandle ref);
  48. ICError ICSetConfigReference(ICInstance inst,ICConfigRefHandle ref,long flags);
  49. ICError ICSpecifyConfigFile(ICInstance inst,FSSpec* config);
  50.  
  51. /* ***** Getting Information ***** */
  52.  
  53. ICError ICGetSeed(ICInstance inst,long* seed);
  54. ICError ICGetPerm(ICInstance inst,ICPerm* perm);
  55. ICError ICDefaultFileName(ICInstance inst,StringPtr name);
  56. ICError ICGetComponentInstance(ICInstance inst,Ptr* component_inst);
  57.  
  58. /* ***** Reading and Writing Preferences ***** */
  59.  
  60. ICError ICBegin(ICInstance inst,ICPerm perm);
  61. ICError ICGetPref(ICInstance inst,StringPtr key,ICAttr* attr,Ptr buf,long* size);
  62. ICError ICSetPref(ICInstance inst,StringPtr key,ICAttr attr,Ptr buf,long size);
  63. ICError ICFindPrefHandle(ICInstance inst,StringPtr key,ICAttr* attr,Handle prefh);
  64. ICError ICGetPrefHandle(ICInstance inst,StringPtr key,ICAttr* attr,Handle* prefh);
  65. ICError ICSetPrefHandle(ICInstance inst,StringPtr key,ICAttr attr,Handle prefh);
  66. ICError ICCountPref(ICInstance inst,long* count);
  67. ICError ICGetIndPref(ICInstance inst,long n,StringPtr key);
  68. ICError ICDeletePref(ICInstance inst,StringPtr key);
  69. ICError ICEnd(ICInstance inst);
  70.  
  71. /* ***** User Interface Stuff ***** */
  72.  
  73. ICError ICEditPreferences(ICInstance inst,StringPtr key);
  74.  
  75. /* ***** URL Handling ***** */
  76.  
  77. ICError ICParseURL(ICInstance inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd,Handle url);
  78. ICError ICLaunchURL(ICInstance inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd);
  79.  
  80. /*
  81.     ***** Mappings Routines *****
  82.     
  83.     Routines for interrogating mappings database.
  84.     
  85.     ----- High Level Routines -----
  86. */
  87.  
  88. ICError ICMapFilename(ICInstance inst,StringPtr filename,ICMapEntry* entry);
  89. ICError ICMapTypeCreator(ICInstance inst,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry);
  90.  
  91. /* ----- Mid Level Routines ----- */
  92.  
  93. ICError ICMapEntriesFilename(ICInstance inst,Handle entries,StringPtr filename,ICMapEntry* entry);
  94. ICError ICMapEntriesTypeCreator(ICInstance inst,Handle entries,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry);
  95.  
  96. /* ----- Low Level Routines ----- */
  97.  
  98. ICError ICCountMapEntries(ICInstance inst,Handle entries,long* count);
  99. ICError ICGetIndMapEntry(ICInstance inst,Handle entries,long ndx,long* pos,ICMapEntry* entry);
  100. ICError ICGetMapEntry(ICInstance inst,Handle entries,long pos,ICMapEntry* entry);
  101. ICError ICSetMapEntry(ICInstance inst,Handle entries,long pos,ICMapEntry* entry);
  102. ICError ICDeleteMapEntry(ICInstance inst,Handle entries,long pos);
  103. ICError ICAddMapEntry(ICInstance inst,Handle entries,ICMapEntry* entry);
  104.  
  105. #ifdef __cplusplus
  106. }
  107. #endif // __cplusplus
  108.  
  109. #endif /* __H_IC_API__ */
  110.